package com.taobao.diamond.client;

import java.util.concurrent.Executor;

import com.taobao.diamond.client.impl.DiamondClientFactory;
import com.taobao.diamond.manager.DiamondManager;
import com.taobao.diamond.manager.ManagerListener;
import com.taobao.diamond.manager.impl.DefaultDiamondManager;

import junit.framework.TestCase;

public class ConfigMonitor extends TestCase {

	public void testConfigInfoGet() throws InterruptedException {
		DiamondManager manager = new DefaultDiamondManager("DEFAULT_GROUP", "dataSource", new ManagerListener() {

			@Override
			public Executor getExecutor() {
				// TODO Auto-generated method stub
				return null;
			}

			@Override
			public void receiveConfigInfo(String confInfo) {
				System.out.println(confInfo);
			}
			
		});
		DiamondConfigure configure = DiamondClientFactory.getSingletonDiamondSubscriber().getDiamondConfigure();
		//configure.setFilePath("");
		System.out.println(manager.getAvailableConfigureInfomation(5000L));
		Thread.sleep(10000000000L);
	}
	
}
